import sys
import MainWindowFormLayout
from PySide2.QtWidgets import QApplication, QMainWindow
from PySide2.QtUiTools import QUiLoader

if __name__ == '__main__':
    app = QApplication([])
    # method_1
    # mainwindow = QMainWindow()
    # ui = MainWindowFormLayout.Ui_MainWindow()
    # ui.setupUi(mainwindow)
    # mainwindow.show()

    # method_2
    class stats:
        def __init__(self) -> None:
            self.ui = QUiLoader().load('./MainWindowFormLayout.ui')

    mainwindow = stats()
    mainwindow.ui.show()
    
    app.exec_()